package com.example.memonto;

public class TextEditor {
    private String text;

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    // 创建备忘录
    public TextMemonto save() {
        return new TextMemonto(text);
    }

    public void restore(TextMemonto memonto) {
        this.text = memonto.getText();
    }
}
